﻿@model ThesisSystem.Models.SysMenu

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <title>Edit</title>
</head>
<body>
    <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
    
    @using (Html.BeginForm()) {
        @Html.ValidationSummary(true)
    
            @Html.HiddenFor(model => model.MenuID)
    
            <div class="editor-label">
                @Html.LabelFor(model => model.Title)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Title)
                @Html.ValidationMessageFor(model => model.Title)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.MenuUrl)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.MenuUrl)
                @Html.ValidationMessageFor(model => model.MenuUrl)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.SortID)
            </div>
            <div class="editor-field">
                @if (Model.SortID == 999)
                {
                    @Html.TextBox("SortID","") 
                }
                else { 
                    @Html.TextBox("SortID",Model.SortID)
                }
            </div>
            if (Model.ParentID != 0)
            {
                <div class="editor-label">
                    @Html.LabelFor(model => model.ParentID)
                </div>
                <div class="editor-field">
                    @Html.DropDownList("ParentID")
                </div>
            }
            <div class="editor-label">
                权限
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.PStudent)学生
                @Html.EditorFor(model => model.PTeacher)教师
                @Html.EditorFor(model => model.PAdministrator)管理员
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.Mark)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Mark)
                @Html.ValidationMessageFor(model => model.Mark)
            </div>
    
            <p>
                <input type="submit" value="保存" />
            </p>
    }
</body>
</html>
